package com.example.stymodel.model;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

/**
 * @author sonli
 * 实体类要实现序列化
 */
@Document(collection = "admin")  //指定要对应的文档名(表名）
public class Admin implements Serializable {
    @Id
    private String id;

    /**
     * 姓名.
     */
    private String name;
    /**
     * 联系方式.
     */
    private String tel;
    /**
     * 邮箱.
     */
    private String email;
    /**
     * 职务.
     */
    private String position;
    /**
     * 备注.
     */
    private String remark;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "Admin{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", tel='" + tel + '\'' +
                ", email='" + email + '\'' +
                ", position='" + position + '\'' +
                ", remark='" + remark + '\'' +
                '}';
    }
}
